package flyweight.pattern.demo;

/**
 * @author 逸足天涯
 * @create 2019-10-14 20:34
 */
public class Robot implements IRobot {
    String robotType;
    public String colorOfRobot;

    public Robot(String robotType) {
        this.robotType = robotType;
    }

    public void setColorOfRobot(){
        this.colorOfRobot = colorOfRobot;
    }
    @Override
    public void print() {
        System.out.println("This is a "+ robotType + "type robot with " + colorOfRobot + "color");
    }
}